package com.hopu.oa.service.impl.process;

import com.hopu.oa.dao.process.auditDao;
import com.hopu.oa.entity.process.*;
import com.hopu.oa.entity.user.AoaUser;
import com.hopu.oa.service.process.auditService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("auditService")
public class auditServiceImpl implements auditService {

    @Autowired
    private auditDao auditDao;

    @Override
    public List<ProcessAll> findAll(Integer userId, String find, Integer index, Integer size) {
        return auditDao.findAll(userId, find, index, size);
    }

    @Override
    public int deleteProcess(Integer processId) {
        return auditDao.deleteProcess(processId);
    }

    @Override
    public List<AoaUser> MailFindUserInfoByName(Integer userId, String userName, int index, int size, int roleId) {
        return auditDao.MailFindUserInfoByName(userId, userName, index, size, roleId);
    }

    @Override
    public List<AoaUser> findUserInfoByName(Integer userId, String userName, int index, int size, int roleId) {
        return auditDao.findUserInfoByName(userId, userName, index, size, roleId);
    }

    @Override
    public AoaProcessList selectOneById(int id) {
        return auditDao.selectOneById(id);
    }

    @Override
    public List<AoaReviewed> selectReviewedByid(int pid) {
        return auditDao.selectReviewedByid(pid);
    }

    @Override
    public AoaBursement selectBursementById(int pid) {
        return auditDao.selectBursementById(pid);
    }

    @Override
    public AoaEvectionmoney selectEvectionMoneyById(int pid) {
        return auditDao.selectEvectionMoneyById(pid);
    }

    @Override
    public int updateReviewedAllUser(int statusId, int proId) {
        return auditDao.updateReviewedAllUser(statusId, proId);
    }

    @Override
    public AoaProcessList selectProcess(Integer proId) {
        return auditDao.selectProcess(proId);
    }

    @Override
    public List<AoaReviewed> selectReviewedStatusId(Integer proId) {
        return auditDao.selectReviewedStatusId(proId);
    }

    @Override
    public AoaReviewed selectReviewedYN(Integer proId, Integer userId) {
        return auditDao.selectReviewedYN(proId, userId);
    }

    @Override
    public int deleteReviewedByNoDeal(Integer proId) {
        return auditDao.deleteReviewedByNoDeal(proId);
    }

    @Override
    public AoaReviewed selectByid(int proId, int uid) {
        return auditDao.selectByid(proId, uid);
    }

    @Override
    public int updateReviewed(String advice, String reviewedTime, int statusId, int proId, int uid) {
        return auditDao.updateReviewed(advice, reviewedTime, statusId, proId, uid);
    }

    @Override
    public int insertIntoReviewed(int proId, int uid) {
        return auditDao.insertIntoReviewed(proId, uid);
    }

    @Override
    public int updateProcessByid(int statusId, int proid) {
        return auditDao.updateProcessByid(statusId, proid);
    }

    @Override
    public int selectIDByName(String name) {
        return auditDao.selectIDByName(name);
    }

}
